<template>
	<view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
		<c-nav-bar :title="titleHeader"></c-nav-bar>
		<view class="time">
			<u-icon name="checkmark-circle-fill" label="支付成功" labelSize="30" size="96" labelColor="#111" color="#007A69"
				space="16" labelPos="bottom"></u-icon>
		</view>
		<!-- <view class="money">
			<text>￥</text>
			<text>{{realityPay}}</text>
		</view> -->
		<view class="bnts">
			<u-button customStyle="height:88rpx;border-radius:44rpx;width:45%;font-size:32rpx"
				@click="goToDetail()">订单详情</u-button>
			<u-button color="#007A69" :plain="true"
				customStyle="height:88rpx;border-radius:44rpx;width:45%;font-size:32rpx"
				@click="toHref('/pages/index/index')">返回首页</u-button>
		</view>
	</view>
</template>

<script>
	import parse from '../../uni_modules/uview-ui/libs/config/props/parse';
	export default {
		data() {
			return {
				h: uni.getSystemInfoSync().windowHeight - 87,
				mt: uni.getSystemInfoSync().statusBarHeight + 44,
				titleHeader: '支付结果',
				type: '',
				radiovalue: "微信",
				myList: {},
				realityPay: ''
			}
		},
		onLoad(option) {
			console.log(option, '支付成功页面option');
			this.type = option.type;
			this.orderCode = option.orderId
			this.realityPay = option.realityPay

		},
		methods: {
			toHref(url) {
				uni.reLaunch({
					url: url
				})
			},
			goToDetail() {
				let url = "";
				if (this.type == 'shipAnd') {
					url = "/pagesTrip/packageArea/order?orderCode=" + this.orderCode;
				} else {
					url = '/pagesTrip/scenicSpots/orderDetail?orderCode=' + this.orderCode
				}
				uni.redirectTo({
					url: url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page {
		// padding-top: 130rpx;
	}

	.bnts {
		display: flex;
		gap: 0 30rpx;
		padding: 0 7%;
		margin-top: 260rpx;
	}

	.money {
		margin: 68rpx 0 140rpx;
		text-align: center;

		text {

			&:nth-child(1) {
				font-size: 36rpx;
			}

			&:nth-child(2) {
				font-size: 48rpx;
				font-weight: bold;
				font-family: PingFang-SC-Bold, PingFang-SC;
			}
		}
	}

	.time {
		display: flex;
		align-items: center;
		justify-content: center;
		padding-top: 64rpx;

		text {
			color: #0EBFFE;
			font-size: 40rpx;
			margin-left: 30rpx;
		}
	}

	.item {
		display: flex;
		justify-content: space-between;
		width: 94%;
		margin: 0 auto;
		padding: 24rpx 12rpx;
		border: 1rpx solid #eee;
		border-radius: 16rpx;
	}
</style>